﻿using GM_Shop.DAL;
using GM_Shop.Model;
using GM_Shop.Model.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GM_Shop.BLL
{
    public class ShoppingCart
    {
        public List<PShoppingCart> getShoppingCart(int uid)
        {
            return new SelectData().SeletcShoppingCart(uid);
        }

        public CJson delShoppingCart(string shopId)
        {
            var info = new DeleteData().DeleteShoppingCart(Convert.ToInt32(shopId));
            if (info == 0)
                return new CJson(0, "删除失败");
            else
                return new CJson(1, "删除成功");

        }
    }
}
